<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: overflow-wrap: anywhere and intrinsic sizing</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all">
<meta name="flags" content="ahem">
<link rel="match" href="reference/overflow-wrap-min-content-size-004-ref.html">
<meta name="assert" content="The word shouldn't be broken, honoring word-break: keep-all, but 'overflow-wrap: break-word' introduce additional soft wrap opportunities, which **are not** considered when calculating min-content intrinsic sizes.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
  position: relative;
  font: 20px/1 Ahem;
}
#red {
  position: absolute;
  z-index: -1;
  background: red;
  color: transparent;
}
.test {
  background: green;
  color: transparent;
  width: min-content;

  word-break: keep-all;
  overflow-wrap: break-word;
}
</style>
<body>
  <p>Test passes if there is a green box below and no red.
  <div id=red>XXXX</div>
  <div class="test">XXXX</div>
</body>
